﻿<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Section.aspx.cs" Inherits="LabMS.Web.Post.BBS.Section" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>在线交流 - 版块分区</title>
    <link type="text/css" rel="stylesheet" href="../../style/screen.css" />
    <link href="../../style/post.css" rel="stylesheet" type="text/css" />
    <!--[if lte IE 6]>
    <link type="text/css" rel="stylesheet" href="../../style/ie6.css" />
    <![endif]-->
    <!--[if lte IE 7]>
    <link type="text/css" rel="stylesheet" href="../../style/ie7.css" />
    <![endif]-->
</head>
<body class="mainBody">
    <form id="form1" runat="server">
        <div class="main">
            <div id="pageInfo" class="clearfix">
                <div class="title">
                    <label>
                        <a href="Index.aspx">在线交流</a></label>&gt; 分区信息
                </div>
            </div>
        </div>
        <div class="main">
            <p>
                <input type="button" id="cancel" class="button" value="返回BBS首页" />
            </p>
        </div>
        <div class="section main">
            <div class="sectionTitleContainer clearfix">
                <div class="sectionTitle">
                    <%= ppInfo.Name.ToString() %>
                </div>
                <div class="sectionAction">
                    <%= ppInfo.Description %>
                </div>
                <input type="hidden" value='<%= ppInfo.ID.ToString() %>' />
            </div>
            <div class="plate">
                <%
                    ExtendBLL.PostPlate pp = new ExtendBLL.PostPlate();
                    System.Data.DataSet dsModerators;
                    for (int i = 0; i < dsPlates.Tables[0].Rows.Count; i++)
                    {
                        System.Data.DataRow row = dsPlates.Tables[0].Rows[i];
                        string todayCount = row["PostCountToday"].ToString();

                        dsModerators = pp.GetAllModerators(int.Parse(row["ID"].ToString()));
                %>
                <div class="plateList clearfix">
                    <div class="plateListBasic">
                        <table cellpadding="5" cellspacing="0" border="0" width="100%">
                            <tr valign="top">
                                <td style="width: 40px;">
                                    <% if (!string.IsNullOrEmpty(todayCount) && (todayCount != "0"))
                                       { %>
                                    <img src="../../Images/forum_new.gif" alt="今日有新帖" title="今日有新帖" />
                                    <%}
                                      else
                                      { %>
                                    <img src="../../Images/forum.gif" alt="今日暂无新贴" title="今日暂无新贴" />
                                    <%
                                        }
                                    %>
                                </td>
                                <td>
                                    <div class="plateTitle">
                                        <a href="javascript:;">
                                            <%= row["Name"].ToString() %>
                                        </a>
                                        <input type="hidden" value='<%= row["ID"].ToString() %>' />
                                    </div>
                                    <p>
                                        <%= row["Description"].ToString()%>
                                    </p>
                                    <p>
                                        版主:
                                        <% for (int j = 0, c = dsModerators.Tables[0].Rows.Count; j < c; j++)
                                           {
                                               Response.Write(dsModerators.Tables[0].Rows[j]["ModeratorName"].ToString());

                                               if (j != c - 1)
                                               {
                                                   Response.Write(",");
                                               }
                                           } %>
                                    </p>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="plateListCount">
                        <p>
                            今日贴数:
                            <%= todayCount %>
                        </p>
                        <p>
                            总贴数:
                            <%= row["TotalPostsInPlate"].ToString() %>
                        </p>
                    </div>
                    <div class="plateListAction">
                    </div>
                    <input type="hidden" value='<%= row["ID"].ToString() %>' />
                </div>
                <% } %>
            </div>
        </div>
    </form>

    <script type="text/javascript" src="../../js/jQuery/jquery-1.3.1.js"></script>

    <script type="text/javascript">
        $(function(){
            $("#cancel").click(function(){
                window.location.href = "Index.aspx";
            });

            $("div.plateTitle").find("a").click(function(e){
                 var id= $(this).parent().find("input[type='hidden']").val();
                 window.location.href="Plate.aspx?plateID="  + id;
                 e.preventDefault();
            });
        });
    </script>

</body>
</html>
